<?php

namespace App\Models;

use App\Models\Rbac\User;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class ModelNumberUser extends BaseModel
{
    use HasFactory;
    protected $table = 'model_number_user';
    // 允许批量操作的字段
    protected $fillable = ['model_number_id','user_id','job_type_id','created_at','updated_at'];

    public function scopeSearch($query,$params)
    {
        return $query;
    }

    public function user(){
        return $this->hasOne(Employee::class,'user_id','user_id');
    }

}
